anchor.diff:          db_open_options = DbOptions
       } = Args,
       % ?LOG_INFO("send_changes start ~p",[StartSeq]),
  -    {ok, {_, EndSeq, Prepend2, _, _, UserAcc2, _, NewLimit, _, _}} = send_changes(
  -        Args#changes_args{dir=fwd}, Callback, UserAcc, Db, StartSeq, Prepend
  -    ),
  +
  +    {ok, ChangesAcc} = send_changes(
  +        Args#changes_args{dir=fwd}, Callback, UserAcc, Db, StartSeq, Prepend),
  +    #changes_acc{
  +        seq = EndSeq, prepend = Prepend2, user_acc = UserAcc2, limit = NewLimit
  +    } = ChangesAcc,
       % ?LOG_INFO("send_changes last ~p",[EndSeq]),
       couch_db:close(Db),
       if Limit > NewLimit, ResponseType == "longpoll" ->
  
positive.code:         StartSeq,
          fun changes_enumerator/2,
          [{dir, Dir}],
          {Db, StartSeq, Prepend, FilterFun, Callback, UserAcc, ResponseType,
              Limit, IncludeDocs, Conflicts}
      ).
  
  keep_sending_changes(Args, Callback, UserAcc, Db, StartSeq, Prepend, Timeout,
  
negative.code: -include("couch_db.hrl").
  
  -export([handle_changes/3]).
  
  -record(changes_acc, {
      db,
      seq,
      prepend,
      filter,
      callback,
      user_acc,
      resp_type,
      limit,
      include_docs,
      conflicts
  }).
  
  %% @type Req -> #httpd{} | {json_req, JsonObj()}
  handle_changes(#changes_args{style=Style}=Args1, Req, Db) ->
  