Fix #50
Merge pull request #73 from Borkason/fix-#50

Thanks Borkason for this very elegant fix for Issue #50