fix the video view and thread bugs