Corrects if statement