fix bug in memInventory() giving false memory leak errors