fix bad flags