fix logical error of function call
small change