handle failure better