fixes #1036