add check for removing UNREF tag