Yeah increasing the buffer_size as needed looked weird to me too, I just added max_buffer_size as a quick fix to avoid getting to numbers that are too large. Since this is not a bug, and this pull request already has a million commits, I'm more inclined to make this change separately.