fix issues in PCA calculator