fix transpose bug for classified output