fixing finalize