Fixed some errors when API client requests.