models bug fix