Automatically sort events when possible