Bugfix for #99

This is to fix #99. Worked for me and seems to work for others as well so may be worth including this change in the main development stream.