Fix bug for sec domain when open in first time.