test prevent infinity loop