Small code rearrangement.