Fixes #505