fixed bug for api request