fixes #1781