fixes #1037