fixes #1065