bug fix in models