Fixed linked list traversal in finalize methods.