Improve handling of the string buffers