Corrected object type in inventory class