changed sorting nodes to work with java 7
changed sorting nodes to work with java 7