[events] Fix render loop