fixed some model xml code bugs