Flickr and Google came under fire earlier this year when images of black people in their photo apps were labeled with the tags “ape” and “gorilla.” Both companies promptly apologized and removed the offensive tags, but many believe that this shouldn’t have happened in the first place.

“We’re appalled and genuinely sorry that this happened,” Google said in a statement. “There is still clearly a lot of work to do with automatic image labeling, and we’re looking at how we can prevent these types of mistakes from happening in the future.”

For Google’s part, much of the problem stemmed from the fact that few photos of black people were uploaded to the app during development, and few black people were involved in product testing, according to the San Francisco Chronicle. This speaks to a larger problem of underrepresentation of minorities in Silicon Valley.