Fixed up tab management some more.