Fix event cleanup