fix flag bug
Revert "fix flag bug"

This reverts commit 6649f51deeb98d96fc9797cd55a8764464cee3d2.
fix flag bug