fixed event loop from happening