fix check on missing values