fix urls for api requests