Added $scope.apply