fix model relationships