Fixed weird free() problem: was wrong calloc