Fixes #1777