Httpclient working, but buggy