fixes some issues with defining as xml