basically, the buffer had some content after allocation in it, so it screwed up last character in 1/10 cases