fixes #1785