fixed for genereic R version
merged