fix sort events