Fix: if branch rearrange