fixing issue #3
fixing issue #2
Merge pull request #4 from regular/master

bug fixes