Tyler Perry has prevented a disaster at the box office with the opening of Lionsgate’s comedy sequel “Boo 2! A Madea Halloween” scaring up a solid $21.7 million at 2,388 North American locations.

That was pretty much the limit of good news at the nation’s multiplexes, where moviegoers gave limited support to a quartet of new arrivals — weather-disaster title “Geostorm,” firefighter hero tale “Only the Brave,” murder mystery “The Snowman” and faith-based drama “Same Kind of Different as Me.”

“Boo 2! A Madea Halloween,” which received an A- CinemaScore, is finishing in line with expectations and about 25% behind original “Boo! A Madea Halloween,” which won its opening weekend last year. The sequel, set at a haunted campground, is directed and written by Perry, who also stars in his ninth iteration as the tough-talking Madea.

David Spitz, Lionsgate’s president of theatrical distribution, noted that Perry’s directed and produced 20 films for the studio with worldwide grosses of nearly $1 billion.

“The film speaks to Tyler Perry’s loyal audience,” Spitz adde. “He knows how to connect with them.”

Spitz also said that the sequel should have staying power similar to the original “Boo,” which wound up grossing $73 million domestically.

Warner Bros.’ “Geostorm,” starring Gerard Butler, is finishing a distant second place with about $13.3 million at 3,246 venues — at the top end of modest forecasts but a major disappointment given the film’s estimated $100 million budget, financed by Warner Bros. and Skydance Media. Movieigoers gave “Geostorm” a B- CinemaScore. The timing of the release, with hurricanes hitting hard in Texas, Florida and Puerto Rico over the past two months, probably dampened enthusiam.

On the international side, “Geostorm” took in $36.4 million at 13,000 screens with first-place finishes in 36 territories to lift its international total to $49 million. South Korea and Russia were the strongest new markets.

Black Label Media’s “ Only the Brave, ” distributed by Sony, is heading for fifth place with $6 million at 2,577 sites, finishing behind Universal’s second weekend of “Happy Death Day” at $9.4 million and Warner’s third weekend of “Blade Runner 2049” at about $7.4 million. “Only the Brave,” is based on the story of the 19 Arizona firefighters who died in the 2013 Yarnell Hill Fire, has received stellar critical support with a 90% “fresh’ rating on Rotten Tomatoes.

STXfilms’ second weekend of Jackie Chan actioner “The Foreigner” will land in sixth with about $5.6 million, ahead of Universal’s “The Snowman,” which is finishing far below forecasts with $3.5 million at 1,812 venues. “The Snowman,” produced by Working Title, is in a tie with New Line’s seventh weekend of horror blockbuster “It,” which will win up with a total of $320 million domestically and $650 million worldwide after 45 days.

“The Snowman,” centered on the hunt for a Norwegian serial killer, fell flat with audiences, who gave it a D CinesmaScore while critics panned the movie with a 9% rating on Rotten Tomatoes.

Pure Flix’s “Same Kind of Different as Me” debuted out of the top 10 with about $2.6 million at 1,362 sites. The film stars Greg Kinnear and Renee Zellweger as a Texas couple who befriend a homeless man, played by Djimon Hounsou. The film earned a 20% “rotten” rating on Rotten Tomatoes.

A24’s horror-thriller “The Killing of a Sacred Deer,” starring Nicole Kidman and Colin Farrell, performed well in a platform launch with $114,585 at four locations. Amazon Studios and Roadside Attractions’ Wonderstruck, directed by Todd Haynes and starring Oakes Fegley and Julianne Moore, also turned a solid opening with $68,762 at four sites.

After a record-setting September that was dominated by “It,” the first three weeks of October have generated a disappointing $430 million domestically — down 11.9% from a year ago and the lowest total for the same period since 2008, according to comScore. Next weekend will see Lionsgate’s launch of “Jigsaw,” the eighth title in the horror franchise, Paramount’s debut of dark comedy “Suburbicon,” starring Matt Damon, and Universal’s PTSD drama “Thank You for Your Service.” Disney-Marvel’s tentpole “Thor: Ragnarok” opens Nov. 3.

“Another slow weekend at the October box office does nothing to chip away at a nearly 5% year to date deficit as the industry tries to remain optimistic with ‘Thor: Ragnarok’ looming large on the horizon,” said Paul Dergarabedian, senior media analyst at comScore.