Why check for the tab here? Does it matter what tab is visible for the functionality?