fix for #4
Merge pull request #5 from snikulov/issue_4

fixed issue #4