fix ng-if scope issues