before flag remove