fix bug where LM operations were not always called