fixes #678