ng-if bug fix