Fixes the tab caption

This fixes the tab caption and updates the close_others method on Tab.js so that we don't have to check for undefined objects.