Fix bug in removing an EventLoop