Fixed order of operations bug.

Well, I feel stupid...