orm bug fix