PoHeader parseHeader function does not properly parse headers