fixed stream issue