Warning: The following article contains SPOILERS for Haunted Mansion.

While speaking toThe Hollywood Reporterabout his new movieHaunted Mansion, director Justin Simien opened up about the film’s original darker ending and revealed how test screenings ended up changing how the movie concludes. Disney’sHaunted Mansionstars LaKeith Stanfield, Rosario Dawson, Owen Wilson, Tiffany Haddish, Danny DeVito, Jamie Lee Curtis, Chase Dillon, and Jared Leto.

The family film follows Stanfield’s character Ben Matthias, an ex-astrophysicist who runs a paranormal tour guide in New Orleans. Things haven’t been the same for Ben since the death of his wife Alyssa (played by Charity Jordan), and as a result, the character was original going to have a tragic ending compared to the more positive one that ended up in theaters. As Simien told THR:

The Cast of Haunted Mansion on Stairs

“The epilogue was certainly a late addition. The first version of the movie that I encountered had a bit more of a darker ending, one that I actually really respected and enjoyed, but I correctly guessed that it maybe wouldn’t get past the sort of Disney machine. But once we cast LaKeith, there was something that changed about what I personally needed from the ending of the movie.”

The director continued, adding that he did not “want to see a Black man have a tragic end” in a movie likeHaunted Mansion.

“Frankly, I didn’t want to see a Black man have a tragic end in a movie like this. I wanted him to have hope at the end of the movie, and a tragic end for a Black character would’ve been really hard to swallow, at least for me right now. So we went with something a bit more hopeful, but there was probably something to the other version as well.”

RELATED:Haunted Mansion: Breaking Down Every Easter Egg in the Disney Remake

Justin Simien Loves the Test Screening Process

Simien then shared his thoughts on test screening saying, “I love the test screening process.Dear White People, my first feature, went through a lot of test screenings, and that was a difficult movie to test screen within the studio system once we got picked up. And I actually really wanted to incorporate some of that feedback, but I didn’t get a chance to on that movie.”

Simien went on to explain the importance of test screeningand the impact it can haveon the film’s creator. He said, “And now, withHaunted Mansion, there were also a lot of test screenings. It’s tricky in a studio environment, and the thing about test screenings is that you can get really emotional about the reactions. You can get very emo and caught up and defensive, and I don’t think that that’s really the best way to go about it.”

He continued, “Audiences always tell you the truth. They may not articulate it perfectly, and they may not actually point to the correct solutions to everything, but you need people to tell you where the movie is meeting them. It takes so long to make a movie, and it’s almost impossible to see the forest for the trees. So you need that.”

The director then noted, “The movie we all remember way after its release and its initial buzz and conversation is co-created between the movie itself and audiences. So you’re flying blind if you don’t go through the [test screening] process. What was interesting about having multiple test screenings in the studio environment is that you have to manage not only your own emotional defenses to what people are saying, but you have to manage a lot of other people’s emotional defenses to what people are saying as well.”

The directed wrapped things up by calling it “a very tricky process, especially within a very large studio,” but ultimately the director does not want to “just make things for myself to live inside a little magic box,” and would seemingly test everything adding, “I would test all the way through. I would test screenplays, and I would even test scenes after I shot them, if that was a thing we could do.”

Haunted Mansionis out now in theaters.