Fix invalid flag initialization