Fix event loop not work issue.