bug fix in RcppBDTpt as<>() method