fixes #1010