fixed #584