fixing restclient request bug