fixed sorting nodes