fixes #1584