change a few memcpy's to strcpy to fix possible segfaults