fixed infinite client retrying bug