Fixed incorrect var in inventory state