I forgot to set some pointers to NULL after free();