Fixed sorting for events. Closes #30