Fixed n^2 ng-repeat bug