fixed minor bug for using only SW or LW in PCA