fixes #1277