fix: changes for xmalloc