Fix issue #76 (I think, untested so far)