corrects if statements