fix issue #161

This seems to fix Simon's problem