Added check to prevent tab flickering on reload