better manage of G_selfreg_tout and G_selfreg_mask vars