Fixes #1785