bug fix

bug fix, allow api options pass function.