register variable issue