anchor.diff:                      %% contains enough data to maybe form a packet
                       %% - fetch a tiny binary from the buffer front to complete the length field
                       {LengthField,Front,Rear} =
  -                        iovec_from_front(4 - byte_size(IncompleteLengthField), Front0, Rear0, [IncompleteLengthField]),
  +                        case IncompleteLengthField of
  +                            <<>> ->
  +                                iovec_from_front(4, Front0, Rear0, []);
  +                            _ ->
  +                                iovec_from_front(
  +                                  4 - byte_size(IncompleteLengthField), Front0, Rear0, [IncompleteLengthField])
  +                        end,
                       LengthBin = iolist_to_binary(LengthField),
                       read_application_dist_data(DHandle, Front, BufferSize, Rear, LengthBin);
                   <<IncompleteLengthField/binary>> ->
                       %% We do not have enough data in the buffer to even form a length field - await more data
  -                    {[IncompleteLengthField|Front0],BufferSize,Rear0}
  +                    case IncompleteLengthField of
  +                        <<>> ->
  +                            {Front0,BufferSize,Rear0};
  +                        _ ->
  +                            {[IncompleteLengthField|Front0],BufferSize,Rear0}
  +                    end
               end
       end.
   
  
positive.code:         [_,_,_|_] = Rear ->
              iovec_from_front(Size, lists:reverse(Rear), [], Acc)
      end;
  iovec_from_front(Size, [Bin|Front], Rear, Acc) ->
      case Bin of
          <<Last:Size/binary>> -> % Just enough
              {lists:reverse(Acc, [Last]),Front,Rear};
          <<Last:Size/binary, Rest/binary>> -> % More than enough, split here
              {lists:reverse(Acc, [Last]),[Rest|Front],Rear};
          <<_/binary>> -> % Not enough
              BinSize = byte_size(Bin),
              iovec_from_front(Size - BinSize, Front, Rear, [Bin|Acc])
  
negative.code:               DHandle, Front0, BufferSize - (4*4+SizeA+SizeB+SizeC+SizeD), Rear0, Rest);
          <<SizeA:32, DataA:SizeA/binary,
            SizeB:32, DataB:SizeB/binary,
            SizeC:32, DataC:SizeC/binary, Rest/binary>>
            when 0 < SizeA, 0 < SizeB, 0 < SizeC ->
              %% We have 3 complete packets in the first binary
              erlang:dist_ctrl_put_data(DHandle, DataA),
              erlang:dist_ctrl_put_data(DHandle, DataB),
  