Fixes issue #584.