fixed duplication bug with ng-if and ng-repeat