Fixes #133, albeit in an ugly way