Both sides score fortunate goals, but Simon Cox's winner eight minutes from time secures the Town's place in League One - taking him over the 30 goal mark for the season.