some fix about ref #626