Fix error when if branch is missing