Convert collect to map to match styleguide.