Sort tree bug fixed