setEndpoint didn't work

if we change the location we need to change it on the client too even if it was previously defined