fixes #1059