fixed a glitch in LM