Fixes #1044