bug fixes of train_lfm