revert the autogen of events, but keep them sorted