fix for invalid http response