add explicit handling of bom