Fix bug : sort events