Fixes #1027