fix bug with rcpp and size_t