fixes #1042