fixed #582