added test for issue #137
fixed issue with test on mac os x
Merge pull request #144 from sashakruglov/issue_137

added test for issue #137