fix lm_train