Fix assert : harmful clean-up codes in finalize are removed.