Fixes #1796