Fix nonblocking select