Fix bug in tab access