fixes #1865