Remove warning and Exception from 'codeRegister'