fix orm bug