fixed issue via $scope.apply