WIP on flag-fixing