fix result after resize, use original buffer size