fix for buffer overflow when web_buffer is increased