made socket buffers slightly more safe