A lack of sleep may impair your ability to recognize if someone is happy or sad, according to a study published in the journal Neurobiology of Sleep and Circadian Rhythms.

For the study, 54 healthy adults slept in a lab for 4 continuous nights. During their stay, they completed a facial recognition test multiple times on occasions when they were either sleep deprived or well-rested. The computer-administered test, which can be seen below, displays multiple images of the same man. Participants were asked to assign each face to one of the following, basic emotions: fear, happiness, sadness, anger, surprise, or disgust.

Read: Sleep Deprivation: 5 Ways It Can Affect Your Mind And Body​

Participants' responses when they were well-rested were compared to their responses after they were sleep deprived for one night.

The researchers found that identification of social emotional expressions like happiness and sadness were affected by a lack of sleep, but other expressions which are considered to express hazardous situations, such as anger or fear, were still recognized by the participants.

“If someone is going to hurt you, even when you’re sleep deprived you should still be able to pick up on that,” said the lead researcher, William D.S. Killgore, in a news release. “Reading whether somebody is sad or not is really not that important in that acute danger situation, so if anything is going to start to degrade with lack of sleep it might be the ability to recognize those social emotions.”

Once the participants got some rest after their night of no sleep, they were able to recognize happiness and sadness again.

The difference in the subjects’ responses were not overwhelming, but are significant enough to take note because they may affect everyday interactions, Kilgore notes in the news release.

More than a third of American adults don’t get enough sleep, according to the Centers for Disease Control and Prevention.

See also: Get Better Sleep: Infographic Shows Why You Can’t Make Up For Hours Of Missed Sleep​

Sleep And Better Mental Health: Improved Shut-Eye May Make You Feel As Good As Hitting A $247,000 Jackpot​