fixes #1066