fix endpoint issue