Fixed an order of operations issue.