Backport the tab fixes from Joe