Bristol Rovers boss John Ward was pleased with the way his team bounced back from a poor performance at Newport to beat York.
John-Joe O'Toole shot a 67th-minute winner to give the Pirates a 3-2 victory at the Memorial Stadium.
David Clarkson's first-half brace put the home side on course but Ryan Jarvis replied with a double, the second a penalty, and the Minstermen fought to the end after having substitute Ryan Bowman sent off.
"We won as a team," said Ward, whose side were beaten 1-0 by Newport last weekend. "It was the first time this season that I had some selection decisions because our injuries are gradually clearing up.
"The response to the Newport game was just what I wanted. We were positive from the outset and David Clarkson has produced two excellent finishes.
"I am not a manager to hedge about things, but I genuinely didn't see either the sending-off or the penalty incidents because I was following the ball.
"Having seen the penalty again on dvd, I don't think it was a lot different to one we claimed in York's box. But these decisions go for and against you over the course of a season."