swapped instance variable back to $scope