Overcoming bug for tab selection