fix reg bug

fix reg bug