Fixes Issue #59

This patch fixes Issue #59 for me. Could you please review it?
Merge pull request #80 from solomax/patch-1

Fixes Issue #59