Fixed some bugs on epoll