Fixed LDA patent bugs.