fix bug of LM