Aldershot boss Dean Holdsworth was delighted to see his "gamble" to bring on Damian Spencer pay off as he popped up with a late winner against Stockport.
Ten-man Stockport looked to have secured a point despite having Alan Goodall sent off in the second half, but Spencer's last-gasp header consigned them to another defeat.
Holdsworth admitted his side were far from their best and felt the defeat was harsh on bottom-of-the-table Stockport.
The Shots boss said: "The first half was one to forget but in the second half we created chances.
"As much as I am frustrated I'm delighted - I said to the players at half-time it would be won with a piece of brilliance, magic or quality and it came right at the death.
"As a testament to Damian Spencer he trained with us on Friday, played 45 minutes midweek and it was a gamble to throw him on."