Motherwell captain Phil O 'Donnell was penalised for a challenge on Kevin Thomson right on the edge of the penalty area and Barry Ferguson stepped forward to bend the free-kick around the defensive wall and against Graeme Smith 's right hand post .