Update hmm_util.c

Forgot boundary situations