Fixes #512