Fix buffer handling error in response filter.