added safeguards that probably prevents showing hidden tab of doom issue