fixed incorrect api usage