partial fix for #55
Merge pull request #56 from czardoz/master

fixed issue #56