added flen == 0 situation handle; fixed read_nonblock return value handlers