Replace all uses of tostring(buffer) with buffer:tostring()