Revert "Revert "Revert "Issue #45 fix"""

This reverts commit 30cb0dcbb3f3c99ab3de957e3d4b9b198d59321a.