fixes #1271