Hack to workaround flicker on ng-leave.