safer string length copying now, just using buffer length...