Fixed bug in the inventory commit