fixes #1239