fix automatically selected first tab