added error queue and error queue clear