fix switching tabs