anchor.diff:      PosInByte = Pos rem 8,
       PreBitsNum = Pos - PosInByte,
       AccPosBF = (2#10000000 bsr PosInByte),
  -    p_add_list_v2_(Rest, AccPosBF, <<0:PreBitsNum>>, BF).
  -
  -p_add_list_v2_([Pos | Rest], AccPosBF, AccBF, BF) when Pos - erlang:bit_size(AccBF) < 8 ->
  +    p_add_list_v2_(Rest, AccPosBF, <<0:PreBitsNum>>, BF, BFSize).
  +
  +p_add_list_v2_([Pos | Rest], AccPosBF, AccBF, BF, BFSize) when Pos - erlang:bit_size(AccBF) < 8 ->
       % Pos in same byte
       PosInByte = Pos rem 8,
       AccPosBF2 = AccPosBF bor (2#10000000 bsr PosInByte),
  -    p_add_list_v2_(Rest, AccPosBF2, AccBF, BF);
  -p_add_list_v2_([Pos | Rest], AccPosBF, AccBF, BF) ->
  +    p_add_list_v2_(Rest, AccPosBF2, AccBF, BF, BFSize);
  +p_add_list_v2_([Pos | Rest], AccPosBF, AccBF, BF, BFSize) ->
       PosInByte = Pos rem 8,
       PreBitsNum2 = Pos - PosInByte,
       DiffBits = PreBitsNum2 - erlang:bit_size(AccBF) - 8,
  
positive.code: new_(BitSize, MaxItems, Hfs) when BitSize rem 8 =:= 0 ->
      #bloom{
             size = BitSize,
             filter = <<0:BitSize>>,
             max_items = MaxItems,
             hfs = Hfs,
             items_count = 0
  
negative.code: 
  %% @doc joins two bloom filter, returned bloom filter represents their union
  -spec join(bloom_filter(), bloom_filter()) -> bloom_filter().
  join(#bloom{size = Size, max_items = ExpItem1, items_count = Items1,
              filter = <<>>, hfs = Hfs},
       #bloom{size = Size, max_items = ExpItem2, items_count = Items2,
              filter = F2}) ->
      #bloom{size = Size, filter = F2, hfs = Hfs,
             max_items = erlang:max(ExpItem1, ExpItem2),
             items_count = Items1 + Items2 %approximation
             };
  join(#bloom{size = Size, max_items = ExpItem1, items_count = Items1,
              filter = F1, hfs = Hfs},
       #bloom{size = Size, max_items = ExpItem2, items_count = Items2,
              filter = <<>>}) ->
      #bloom{size = Size, filter = F1, hfs = Hfs,
             max_items = erlang:max(ExpItem1, ExpItem2),
             items_count = Items1 + Items2 %approximation
             };
  join(#bloom{size = Size, max_items = ExpItem1, items_count = Items1,
              filter = F1, hfs = Hfs},
       #bloom{size = Size, max_items = ExpItem2, items_count = Items2,
  