fix reg issue