Fixed problem with adding related object to main model