Fixed the problem with factors from merged data being converted to NAs during preparation for MI.