Fixes #1782