fix the cleaning up of past events