The Buffalo Bills spent extra time during their bye week working on run-stopping fundamentals with their front-seven defenders.

“We had a good week,” said defensive coordinator Dave Wannstedt. “We took advantage of the bye week and really didn’t jump ahead and add as many things as we tried to clean up what we weren’t doing as good as we need to do. Fundamental stuff.”

Wannstedt saw signs of progress in the 21-9 loss at Houston last week and hopes it’s an indicator of things to come.

“The runs we gave up against Houston, the two longest runs, we were in pressures and it was two rookie mistakes that we just didn’t fit it up right, or we could have held them under 100 yards rushing,” Wannstedt said.

“I thought the best thing about it was our guys gave great effort. There was as much gang tackling and several guys to the ball every play as we’ve had.”

Bad defense has been the story of the first half of the season for the Bills. Buffalo ranks 31st in yards allowed, 31st in points allowed, 32nd on third down defense and tied for last in red zone defense.

Nobody in the organization saw this kind of performance coming.

“I think a little bit of it is a new system,” said Wannstedt, who switched to a 4-3 scheme this year. “We have five first- and second-year players starting for us on defense, which is the most of anybody in the league. When we get into nickel and Justin (Rogers) comes in, it’s six. So we’re a young group.”

“At times it’s been more us (than the opponent). We just have to continue to keep coaching better and harder and keep playing harder and better and it’ll come together. I’m very confident of that. About 40 percent of our points have been (allowed) ... in the fourth quarter. Is that maturity? Is that not mental toughness? Whatever the reason, I don’t know. It could be a variety of things. But I just come back to one word, consistency. We’ve got to play consistently from the opening snap to the end of the game. That’s probably the one thing obviously we have not done week in and week out.”

With the defensive shortcomings foremost in mind, here’s a position-by-position assessment of the Bills at midseason as they head into Sunday’s game against mighty New England.

Quarterback

Ryan Fitzpatrick’s interception at the end of the 35-34 Tennessee loss was a killer for the entire team. Fitzpatrick ranks 20th in attempts, 26th in yards, eighth in TD passes, tied for 26th in interceptions and 15th in passer rating. The Bills have a pop-gun passing game. Their yards per pass play average is 23rd. The QB’s job is to win games.

Grade: D

Running back

C.J. Spiller’s yards-per-carry average of 7.2 is the second best in the NFL since 1960 for players with at least 75 carries. It’s time to get him at least 18 touches a game. Fred Jackson has looked better the past few weeks since his sprained knee has improved.

Grade: A

Offensive line

The Bills are eighth in sacks per pass attempt allowed and sixth in rushing yards. Cordy Glenn has been a pleasant surprise at left tackle. He has yet to give up a sack. Both guards, Andy Levitre and Kraig Urbik, have played well. Center Eric Wood has played an amazing 488 of 494 snaps despite coming back from major knee surgery. He’s tough and only will get stronger. Injured right tackle Erik Pears has been the weak link, giving up three sacks, unofficially. But Chris Hairston has been a stable replacement at tackle.

Grade: B+

Receivers

The Bills need more big-play talent at receiver. T.J. Graham has averaged 37 snaps a game but it’s asking a lot for a third-round pick to be a big factor as a rookie. Stevie Johnson looked hindered by the groin the first two games but has been mostly fine. Scott Chandler is a capable tight end. Due to the injury to David Nelson, the Bills haven’t used a true four-wideout set on one play this season.

Grade: D

Defensive line

The front four hasn’t created enough havoc to make the straight-forward defensive approach work. Kyle Williams has been the Bills’ best front-seven defender. Mario Williams has 4.5 sacks and has a wrist problem, but the Bills need more out of him. Marcell Dareus was poor vs. New England, San Francisco and Tennessee. Mark Anderson was awful vs. the run against the Pats and Niners.

Grade: F

Linebackers

Nick Barnett remains the team’s best linebacker. Kelvin Sheppard hasn’t made enough impact plays. Teams are trying to use misdirection and motions to make rookie Nigel Bradham hesitate or overpursue.

Grade: F

Defensive backs

Jairus Byrd won the Arizona game for the Bills and is enjoying a fine season. Rookie Stephon Gilmore has bit on some double-moves but has been reasonably solid. Aaron Williams has given up five TD passes. More plays are needed from safety George Wilson. The Bills could have used a 100 percent healthy Terrence McGee but his injured knee wouldn’t cooperate.

Grade: D

Special teams

Leodis McKelvin leads the league in punt return average and is third on kickoff returns. The John Potter experiment failed, but the Bills are ninth in kickoff coverage. The punt return TD allowed vs. the Jets hurt. Rookie punter Shawn Powell shows promise.

Grade: A-

Coaching

It’s not so much that they’re 3-5, it’s the way they’re 3-5. The defense is historically bad, and it has not played as an 11-man unit. That’s on the coaches to get their message across more effectively. If the Bills don’t beat Miami at home in five days Chan Gailey’s ability to keep the players believing becomes much tougher.