bugfix of baum-welch loop