Fix order of operations.