Fixed lda bug