Fixed sorting issue caused by concurrency and JDK7