Fixes #1059