Fixes #1051