fix eventloop atomic variable