Used select instead of map to avoid nil deprecated error.