getVariables function and missing values