bugfix in functions for CCA regarding crash of R session (fixes #14)