bug fixed for stream reader api