fixed a critical bug regarding which tab to set active, when a video is ended.