fixes #591