fixes reading response header