fixed some bugs in videoplayer