fix bug in orm