Minor fixes in the controller