v1.6.3: Corrected tab focusing code