Slightly improve performance of switching tabs