Fix the error management