Fixes #298, not great way though