fix some bugs in LM