Fixes #517