Corrected IF-statement