Fix some bugs in stream player