Fixed a warning in ControllerFactory