fix models bug