fixed a bug of lda.