fixes #1765