fixes #940