Fix event closing