Changed map comparator to sort keys with same value in alphabetical order.