A Quartz report reveals that a new study found that preschoolers with a TV set had poor quality sleep and more reported episodes of nightmares and sleep terrors.

The study, published in Sleep Medicine, involved learning about the habits of 100 children in Santiago, Chile, and studying their sleep quality based on a standardized survey called the Sleep Disturbance Scale for Children (SDSC). Those who scored higher on survey—that is, slept worse—weren’t watching that much more TV. They were just watching it later in the day.