fixes #1023