epoll now working, but deregistering not quite right