fix bug of misplace stream cursor