fixed some mangling of HMM parameter estimation