fixes #1796
fixes #1818