fixing a bug where data is not passed correctly to the related model (name !== local)