fixes #1126