Handle functions in $root scope.