fix bom problem with search func