Fixed order of operations error