Change the type of the 'createRegisterIndex' functions to make them total.