fix issue #2
improvements for issue #2 fix based on Abhoryo PR comments
Merge pull request #7 from acseo/master

Fix #2