Fix event loop problem.