Fixed ORM definition errors