fixes #1044