fixes #582