update parent scope to solve flag update