fixes #1597