fixes #1038