fix R issue