fixed finalize