Fix event loop hang if there are no plugins