Although crime dramas may make it seem like eye witness accounts are infallible, in real life it's not always so simple. According to a new study, the type of crime committed has a big effect on witnesses’ memory of the perpetrator, so much so that witnesses of drive-by shootings tend to remember the faces of black suspects less accurately than they do in serial killings.

A new study now published online in Social Psychology & Personality Science investigated the effect that crime type could have on witnesses’ memories. For the study, a team of researchers from the University of British Columbia in Canada showed four groups of participants staged videos of a black man leaving the scene of a crime. In one video the man was leaving the scene of a serial killing and in the other the man left the location of a drive-by shooting. Half of the participants were told the race of the victims and half were not. After viewing the videos, participants were shown photos of suspects. The images had been digitally altered to adjust features such as skin color, nose width, and lip fullness, and participants were asked to pick the image they believed most closely resembled the perpetrator.

Results showed that participants remembered a suspect’s face better if they watched the serial murder video than they did when they viewed the drive-by shooting video. According to study author Paul Davies in a recent statement, this result shows how subconsciously biased our minds often can be.

"What this study shows is that the memory of an eyewitness is heavily influenced by the type of crime that was committed," said Davies. "In crimes such as drive-by shootings, typically associated with black males, eyewitnesses overwhelmingly remembered the black suspect's face incorrectly.” On the other hand, black faces were remembered with a higher degree of accuracy if they had committed a typically “white” crime, such as mass murder.

The research could have important implications since black males are often wrongly imprisoned due to being falsely identified. According to Davies, these results could suggest that justice systems may want to reconsider how much weight they put on eyewitness memories.

This is not the first time that researchers have noted that subconscious biases can affect our visual perception. A study published earlier this month found that certain widespread stereotypes, such as men being aggressive and black individuals being more hostile, can actually warp how the brain sees a person’s face. In the study, researchers looked at individuals’ brain activity when they viewed images of black males and found that the neural patterns were similar to those enacted when the individuals viewed an angry face.

Although these findings may sound unsettling, the researchers believe that identifying our shortcomings and unconscious biases is the first step to eliminating them.

“This visual bias occurs the moment we glimpse at another person, well before we have a chance to correct ourselves or regulate our behavior,” said study author Jonathan Freeman in a statement.

Sources: Davies PG, Hutchinson S, Osborne D, Eberhardt JL. Victims’ Race and Sex Leads to Eyewitness Misidentification of Perpetrator’s Phenotypic Stereotypicality. Social Psychological & Personality Science . 2016