Fixed finalizer code.