Fixes #1365