fixed the ng-repeat too many times bug