fix for issue #584