Bug Fixes for BOM Parsing