Fixes #513