fix issue where sometimes there is's no error in the errors array