Minor fixes to LDA and MM