Rcpp is a pain