Fixes #1091