Fixes #1778