Coleraine head coach Dean Shiels said his side had to win ugly as stoppage time goals in each half saw off Loughgall at The Showgrounds.