please copy the \0 too