Fixed focus issues when switching tabs, fixed doc ids