Fix field undefined issue