Fix bugs in runMI on categorical variables with exogenous predictors