fixed setting O_NONBLOCK