Fixes #1861