fixes #1782