Spoilers for The Haunting of Hill House follow below.

Netflix released the 10-episode horror series The Haunting of Hill House last Friday, but plenty of folks have already come to the end of this spooky, surprisingly emotional story. The show is based on the iconic Shirley Jackson novel of the same name, but creator, writer, and director Mike Flanagan (Oculus) put his own stamp on the material, expanding the story of a haunted house into a sprawling family drama. The result is a rich, moving, and yes incredibly scary viewing experience, and while the show ultimately ends with a glimmer of hope, it almost concluded in a much darker manner.

If you’ve seen Haunting of Hill House all the way through, you know that by the season’s end, the surviving members of the Crain family made it out of Hill house alive and are seen celebrating the sobriety of young sibling Luke (Oliver Jackson-Cohen) in a flash-forward set over a year later. This after spending an evening trapped in the Red Room, which it turns out had originally manifested as various different rooms during the Crains’ childhood—a game room for Steven, a playhouse for Luke, etc. It placated the children while the house digested them.

Speaking with THR about the Haunting of Hill House ending, Flanagan reveals an alternate conclusion that was originally planned, one that would have ended things on a much more depressing note:

“We toyed with the idea for a little while that over that [ending] monologue, over the image of the family together, we would put the Red Room window in the background. For a while, that was the plan. Maybe they never really got out of that room. The night before it came time to shoot it, I sat up in bed, and I felt guilty about it. I felt like it was cruel. That surprised me. I’d come to love the characters so much that I wanted them to be happy. I came into work and said, ‘I don’t want to put the window up. I think it’s mean and unfair.’ Once that gear had kicked in, I wanted to lean as far in that direction as possible. We’ve been on this journey for 10 hours; a few minutes of hope was important to me.”

I’d say Flanagan made the right call here. The show puts the audience through the emotional wringer, and to end on the notion that they’re possibly still trapped at Hill House would just have been too upsetting. So I’m glad Flanagan changed his mind and ended on hope.

The filmmaker also discussed the notion that Hugh (Timothy Hutton/Henry Thomas), Nell (Victoria Pedretti), and Olivia (Carla Cugino) are still trapped in Hill House, speaking to the thematic resonance of that idea:

“Steven inherits Hugh’s responsibility, and the house is still standing. It’s still haunted, and everyone’s still trapped. But they’re together. It is a little bittersweet. When we think about families, that’s what we’re left with. We’re stuck with our family no matter what, and even if it’s not going to be OK, even if we’re never going to get back what we lost, at least we can find a way to live with that. That little bit of comfort meant a lot to me. We could have gone pretty cynical, and almost did. But I find myself glad that we didn’t.”

I think we’re all glad. Flanagan doesn’t speak to a Season 2 in this interview and nor has Netflix officially announced a second season, so it’s unclear if this is the end of the road for the Crain clan or if there’s more story yet to be told. Regardless, the 10-episode first season of The Haunting of Hill House is one of the best pieces of original content Netflix has released thus far.