Fixed bug with inventory tracking