fix for issue #19
Merge pull request #20 from d-zhukov/master

issue #19 fix