Fix duplicate relation when using method create##Classname
Fix not removing unused relations