Fixes #1789