There's a part in Rosewater in which a reporter from The Daily Show interviews Maziar Bahari (Gael García Bernal) and jokes about him being a spy. That seemingly innocuous exchange is dredged up later on when Bahari is blindfolded and captive in a prison, being bombarded with questions about treason, sexual inclinations, and espionage. Although this film is based on fact—and features the real Maziar Bahari as a production consultant—the interview has particular weight in the story, and is treated more or less like the lynch pin of the entire narrative. Did Jon Stewart (host of The Daily Show as well as first-time writer-director) make Rosewater as atonement for putting Bahari in jail?

It feels that way. Stewart directs this movie with genuine conviction, but is obviously new to the job. He's a cultural commentator first, and a filmmaker somewhere much farther down the list. So while Rosewater is muddled, overlong, and downright boring at times, you can tell that Stewart poured his heart and soul into this movie. It's that very resolve to uncover the truth that bogs the film down, from political minutiae, Bahari's daily grind of interrogation and solitary confinement, and the inevitable journey towards freedom due to his status as an adoptive Westerner. All this could be fascinating literally on paper (see the source book, Then They Came for Me, written by Bahari and Aimee Molloy), but Stewart hasn't yet figured out how to present it all in an engaging way. This causes the movie to feel more like a history lesson than cinema, which is an ineffective way to spread the story to a wider audience. I know I got sleepy at one point.

The "plot," which is public record: in June of 2009, Bahari—an ex-patriate Iranian freelance photojournalist living in England with his pregnant wife—ships out to his home country to cover the presidential election. While there he befriends revolutionaries who want to bring down the incumbent, Mahmoud Ahmadinejad, who is widely considered to be reactionary and corrupt. A combination of a misinterpreted interview and video coverage of the violent deaths of revolutionaries lands him in prison, where he is interrogated for months under the suspicion that he is a spy.

This film has a couple of glaring issues, one of which is its casting. It is surprising that a clearly race-conscious person like Stewart would overlook the implications of casting a non-Iranian as his lead. Bernal may be quite good in the role, and is frequently the only person onscreen maintaining audience attention in its dreary middle section, but you can never forget that he is Mexican, not Iranian. It's not a matter of him looking the part, or being incapable of abandoning his personal tics as an actor, but the mere fact that he is unlike the rest of the cast. The great Shohreh Agdashloo, an Iranian actress, plays his mother, and practically everyone else around him is, too. Was every other working Iranian actor busy? The cognitive dissonance created by the casting is always distracting, and is a further knock against the film.

All this said, I am nevertheless excited about Stewart's future as a filmmaker. He redeems himself in the beginning of the third act using humor and irony to defuse the tension of Bahari's situation. Stewart even positions storytelling as a viable way for Bahari to escape his darkest moments, as we see him have conversations with his dead father and sister, who were also imprisoned for revolutionary tendencies. There are even some laugh-out-loud moments that feel earned and never clash with the tone established by the film. Stewart feels like a hopeful filmmaker, despite the fact that he is the first to point out how absurdly broken the world seems to be in his day job. This film may fail more often than it succeeds, but it also indicates that Stewart may be worth watching in the future.