initialize the base controller outside the if statement