Fix errors when video is hidden