Fixes #1331