fix finalize usage