fixes #1796