fix ng-if breaking scope