fix the error of unresolved direct api method