Fixes #1765