fixes #1580