fix the register case