fixes #580