adding memory leak fix to ng-repeat