Fix liker error with pca and lda methods.