Make TaskRegister return bool.