Fix orm bug