fixes to LDA and NMF