fix missing value handling