fix flag setter