Made small fix to getInventory