set correct register type