fix forward-backward and max likelihood training