Improved error treatment.