fix ORM bug