nonblock read bug fix