`totalContent` is not defined, should be `buffer` according to context.