Several issues fixed for MCML decoding