fixes #1257