Minor fixes for controller.