Fixed tab visibility bug