fix issue #101

Thanks to @floriangilles for spotting the problem and helping to come up with the fix.

Closes #101