fix for issue #582