Fix bug with handling duplicated in ng-repeat