fix rename resource bugs