fix relationships with models
Merge branch 'master' into user