model bug fix