Fix non-current tab after closing issue