fix: xmalloc changes