finalize only if not yet finalized