Fixed bugs in the HL7