bug fix for imputing missing values