fixes #1789