fixes #547