fix events comparator