XML refactor fix