fixes #1786