fixed stream callback for res