fixing some memory issues with arpack_cg and eigenvalues_arpack