Revert "Actual fix for Issue #365"

This reverts commit a981d710a7d76bbc8b716c3a6f4d3cded09cc33e.
Much more elegant fix for Issue #365.
Fixed Issue #367