Fix the inventory bugs.