Fix the order of operations.