Make sure there are a focused tab when changing tab