fix the inifinite loop in baseURL