Correction in if statement