Fixed error while removing last tab.

First tab becomes active when the current is removed.