$scope.inputStop set to null when error