fixing clustering order bug.