fixes #1018