Fixes #1864, #1884