Probably fix #153

After the bug reported at #153 this change to codebase might be useful.