Fixes #1864