Improve error management.