fix r package stuff related to ami upgrade