fixes #1640