Fixed some errors in the RestClient class