Fixed a Fatal Error when registering the text field