fixed the orm bug