Fixes #1066