Potential fix for issue #66

I was also affected by issue #66 and this is the fix I'm personally using. I'd appreciate if other users can review/test and hopefully it can be pulled into the next release.