fix console dialog hang issue when first show up.