Bug fix, should be $rootScope