horribly hacky fix to issue #9