update setpRegister with some fix

Added default value