Fixed error case.

added [queue finishTransaction:transaction] in the error case so the failed transactions are removed.