removed extraneous $rootScope.$apply