Fix placing of xml declaration