Fixes #1780