fix error in if sentence