fix unit xml parsing errors