Moved safeAppply to $rootScope.$safeApply(fn,scope)