change ref target of global names