Upgraded HttpClient.
Fixed some bugs.