Fixed the segmentation fault bug when freeing