Fixing evetns loops