Fixed passed by reference problem in getControllerName.