Corrected if () handling