Switch from calloc to malloc
Copying name in wrong direction