Fix error recovery