fixed error management