fix endpoint url and wrong script dependency