Revert "flag check"

This reverts commit 83ad40ed4b617b085b1cac996095921e79b13e9c.