Fixing a bug with the tab control.