Fixed print_transition_matrix.