Fix stripping of XML header