Fixed stream issue in proxy mode