fix bom issue for the ordered dictionary