fix regsiter issue