inv = NULL to inv <- NULL