Fixed stochhmm check function