Updated

Mike Gundy has coached some of the top offensive teams in school history at Oklahoma State, including the one two years ago that was a loss to Iowa State away from playing for the national championship.

After a comeback victory over Kansas State on Saturday, the Cowboys' 14th win in their last 15 games at home, Gundy was ready to leave the past behind and focus on what he sees as an improving team this season.

No. 22 Oklahoma State (4-1, 1-1 Big 12 Conference) escaped with a 33-29 victory over the Wildcats (2-3, 0-2) thanks to a six-play, 75-yard touchdown drive late in the fourth quarter, one engineered by quarterback J.W. Walsh.

It was a well-timed bit of offensive output for Walsh and the Cowboys, who had struggled offensively for much of the second half — failing to gain so much as a first down in the third quarter.

Regardless of how they earned the win, Gundy was just relieved that Oklahoma State — the preseason Big 12 favorite — bounced back from a surprising loss a week earlier at West Virginia.

The ninth-year coach was also ready to keep the focus on the expectations for this year's Cowboys, not the offensive juggernauts the school has been known for in recent years.

"I think we're getting better, but the comparison you make for the offense that's been around here for 6-7 years is, at some point, a little unfair," Gundy said. "It's not like you can just continue to do it forever."

Oklahoma State has its second bye this week before returning to action at home against TCU on Oct. 19. The time off will give Gundy extra time to correct an offense that's suddenly gone cold in the red zone.

The Cowboys opened their season 3-0, including a season-opening win over Mississippi State, doing so by scoring on all 15 of their trips inside the red zone. However, in the 30-21 loss to the Mountaineers last week, Oklahoma State advanced inside the 20 just once — coming away with nothing.

On the surface, the red-zone offense was much improved on Saturday, with the Cowboys coming away with points in seven of eight trips inside the Kansas State 20-yard line.

The problem was that four of those trips resulted in field goals, not touchdowns.

Luckily for Oklahoma State, kicker Ben Grogan — who entered the game 1 of 4 this season — bounced back from a pair of misses against West Virginia.

The freshman connected on field goals of 30, 43, 23 and 28 yards, helping the Cowboys overcome a blocked kick in the second quarter that Kip Daily returned 65 yards for a touchdown for the Wildcats.

"He's in a tough situation," Gundy said. "To be a field goal kicker, you're isolated. In today's cyberspace, media and Internet chat rooms ... Tough gig, now, for a guy to miss a couple short field goals. You hear it a lot.

"I told the team that I thought he did a great job of staying focused. It's not easy."

While Oklahoma State has an extra week to work out its offensive kinks, Kansas State has no such luxury. The Wildcats, who have lost two straight games, host offensive power Baylor this week, and they'll do so with a host of questions about the quarterback position after Daniel Sams emerged as the primary option on Saturday.

Sams had attempted just four passes this season entering the game while sharing time with Jake Waters, but he accounted for 299 yards of total offense while nearly leading Kansas State to the victory.

The sophomore dazzled with both his legs (118 yards rushing on 27 carries) and his arm (15-of-21 passing for 181 yards), and he accounted for three touchdowns — including a 3-yard run in the fourth quarter that put the Wildcats up 29-23.

However, he also threw three interceptions — including a pair on Kansas State's final two drives — as Oklahoma State rallied.

The Wildcats, who entered the game second in the Big 12 in fewest penalties, struggled at the line of scrimmage. They finished with 12 penalties for 92 yards, including a host of false starts that hampered drives.

"In our history, we just have not been that kind of a football team," Kansas State coach Bill Snyder said. "I mean, we haven't always been extremely good, but we haven't always turned the ball over, and we haven't always been penalized.

"We had a chance to win even with it, like you said, but it sure makes it a heck of a lot harder."