fixed a bug for factor analysis bug reported by Nurina