As the Rams prepare for a matchup against the Seattle Seahawks (4-4) on Sunday, they’ll first have to address the issues that plagued them against the Saints. In their worst defensive performance of the season, Drew Brees passed for four touchdowns and Alvin Kamara rushed for two more as the Rams allowed a season-high 45 points and 487 total yards of offense.

“We going to fix it,” Aaron Donald said. “We ain’t panicking. We’ll make the corrections and fix it and get better.”

Another inconsistent performance, one that — unlike in previous games — they couldn’t overcome in the final minutes, begs the question: What exactly does the Rams’ defense need to improve?

The Rams’ 8-1 record reflects that the defense has performed well enough to win.

But make no mistake, the defense underwent an offseason overhaul in an effort to put it on par with last season’s top-scoring offense. This is a team that gave Ndamukong Suh a one-year deal worth $14 million, picked up Peters’ fifth-year option that will pay him about $10 million over two seasons and will spend $19 million on Aqib Talib for two years, not to mention the $11.3 million cost to franchise tag Lamarcus Joyner and the six-year, $135 million extension given to Donald.

So far, it hasn’t exactly paid off.

Through nine games, the Rams’ defense is allowing the 14th-most passing yards per game and the 13th-most rushing yards per game. Teams are averaging 22.2 points per game (10th), a number somewhat skewed by a Week 2 shutout of the struggling Arizona Cardinals. The Rams have given up 53 offensive plays that gained 12-plus rushing yards or 20-plus passing yards, which is seventh-most in the NFL, according to ESPN Stats & Info.

In the first half against the Saints, the Rams appeared unable to stop the run, defend the pass or simply wrap up and tackle.

“They were getting out of the huddle, they were tricking us with a bunch of formations and stuff,” Michael Brockers said.

Alvin Kamara did most of his damage in the first half, and the Saints recorded 487 total yards against the Rams. AP Photo/Bill Feig

But in the second half, most of the issues appeared improved. After passing for 211 yards and three touchdowns in the first half, Brees was held to 135 yards and a touchdown in the second. After rushing for 50 yards and two touchdowns in the first half, Kamara gained only 32 after the break.

“The biggest thing, especially with just defense in general, with a team like that, that does such a great job changing up their tempos, personnel groupings, putting different players in a variety of different spots, it’s just getting the call in,” coach Sean McVay said. “Getting our cleats in the grass, being ready to go and lock in and play with the proper technique with our alignment, our assignment and just the fundamentals.”

But a lack of consistency on defense can’t exactly be what the Rams envisioned with a defensive line that features three first-round picks, including the reigning NFL Defensive Player of the Year in Donald, plus Suh and Brockers.

“We just got to execute the calls that are called,” Brockers said.

The Rams are still No. 1 in the pass rush win-loss rate for the season, at 64.9 percent, according to ESPN pass rush metrics using NFL Next Gen Stats. But against the Saints, they did not record a sack for the first time this season.

“There will be games where you get a bunch,” said Donald, who has 10 sacks this season. “Sometimes you get a couple, and some games you just get none.”

Before the trade deadline, the Rams added former first-round pick Dante Fowler Jr., with hope that the fourth-year pro would provide pressure from the edge that otherwise has been missing. Fowler, five days after joining the team, played 62 percent of the snaps against the Saints.

In the secondary, the Rams traded for Peters and Talib, who has been on the injured reserve since he suffered an ankle injury in a Week 3 victory over the Los Angeles Chargers. For his part, Peters has struggled.

On Sunday, Saints receiver Michael Thomas caught 12 passes for 211 yards, a Saints franchise record for receiving yards in a game.

According to NFL Next Gen Stats, Peters was the nearest defender on eight of Brees’ targets, all of which were to Thomas. Thomas caught six of those eight passes for 127 yards and a touchdown. The most notable completion came in the final four minutes of the game, when Thomas flew by Peters for a 72-yard touchdown reception.

“I got beat,” said Peters, who brought an impressive résumé with him to L.A., including a league-high 19 interceptions in three seasons. So far this season, he has added only one more. “I’ve had a bad couple of weeks.”

Peters has been the nearest defender on seven touchdown passes, the most given up by a cornerback this season, according to NFL Next Gen Stats. Targeted receivers are averaging 12 yards per target when Peters is the nearest defender, the second-highest rate allowed by a cornerback with at least 25 targets.

“He’s a guy that we have a lot of confidence in,” McVay said. “In a lot of instances, he’s isolated one-on-one with the other team’s best receiver, and that’s come up throughout various times this season.”

But for the several areas that need to be shored up, one thing is certain: The Rams’ defense clamps down when it has to.

After Brees racked up 35 points and the Saints gained 313 yards in the first half, they scored only 10 points in the second half and gained only 174 more yards.

“At that point, we come in, we definitely make adjustments,” Brockers said. “That’s what we do.”

That’s a trend the Rams have gone with all season, as they’ve allowed an average of 9.1 points per game after halftime this season, which ranks second in the NFL to the Ravens’ 5.6, according to ESPN Stats & Info.

“Just the overall urgency that we can consistently display,” McVay said, “I think will help us play better as a unit.”