make binary conversion copy the buffer to avoid overwrite issues