added a hack to make sure the default tab is selected properly