Fix failure handling