fix in modelDepot when keyPath is undefined.