fix_delete_function