Add a hack to workaround bug

Here is a fix for issue #97. Not sure if you will want to merge this with it being a temporary workaround but it may be useful for somebody.