Fixed a bug where the inventory did not save.