1040 fix relations in models

should fix #1040 
`|ont|`: see below.