fixed the base controller method onRegister no working