fixed a bug that was causing http client to fail on mac os x with
semaphore error