Fixed Comperator to WeightedState.