Fixed sorting function so it places best base clusters first
Merged