Added the add_to_free, getting segfault