fix cross-tabulation