Fix a few major inventory bugs.