fixed small bug with inventories

inventories are arrays and the diff functions thought they where objs.