This should be in base controller.