fixed no variation error in build kpca object