Changed the control statement for _check_registered_widget