Titans defeat Cobras in tight finish