Kevin Hart’s Philadelphia-filmed movie The Upside is No. 1 at the box office, thanks to a $19.6 million weekend opening days after the comedian officially declined to host this year’s Oscars ceremony.

Starring Hart as ex-convict Dell Scott and Bryan Cranston as wealthy paraplegic Phil Lacasse, The Upside managed to dethrone former box office leader Aquaman, which had held the No. 1 spot since its debut last week. The film succeeded despite lukewarm critical reviews; it has a 40 percent fresh rating on the movie review aggregation site Rotten Tomatoes. Variety had projected The Upside would take in about $10 million in its opening weekend.

Filmed in Philadelphia and at Aston’s Sun Studios, The Upside had a seemingly uphill battle, given Hart’s Oscars hosting controversy stemming from homophobic tweets and comments he made as far back as 2009. Hart has since apologized for his remarks, and he officially declined to host the Oscars, despite a recent appearance on The Ellen DeGeneres Show that may have suggested otherwise.

Audiences seemed not to mind the controversy. But because the film initially was to be released by the ill-fated Weinstein Co., they almost didn’t get to see it at all. The company went bankrupt over sexual assault allegations against Harvey Weinstein, and The Upside was shelved to await a new distributor. STX Entertainment bought the film in August, making The Upside the four-year-old company’s first No. 1 hit.

STX recut The Upside to attain a PG-13 rating from its initial R rating, reportedly removing foul language.

STX chairman Adam Fogelson told Variety The Upside’s success comes down to one thing: Marketing.

“Frequently, Hollywood gets wrapped up in a lot of its own noise. That noise [doesn’t always] permeate the rest of popular culture,” Fogelson said. “I think far fewer people knew about the inside baseball. Most moviegoers became aware of this movie when we started running trailers.”

Most advertising focused on the relationship between Hart and Cranston’s characters, making it seem like a lighthearted buddy comedy, even if that’s not what the intention was. “[I]n my first conversations with Kevin, I wanted to make sure that he knew we weren’t making a buddy comedy romp. That this was something different,” Cranston told the Inquirer’s Gary Thompson in 2017. "And he absolutely knew that, and was ready for it, and was looking forward to the challenge. And I think people are going to be knocked out by what he does.”

It was a bet that paid off. Audiences gave The Upside an A in Cinemacore, which measures films' appeal. That bodes well for the rest of the film’s theatrical run.

The Upside is the latest Philly-filmed movie to find success at the box office. Glass, M. Night Shyamalan’s sequel to Unbreakable and Split, is scheduled to open Friday, expected to take in about $70 million, according to Deadline, a rare showing during the post-December awards glut.