fix exceptions treatment.