Fixed issue with unselected tabs when gc is opened

This issue also broke the search function.