ORM relations fix