inv tree bug fixed