Misplaced if/else