fixes #1009