small changes to Controller.php