fix relationships with models