Better management of error recovery