Minor update

Rearranged the placement of certain lines of code.