fix relations in Model class