Learning Through Failure and Correction