Fixed a bug in combining transition matrix.