async-wrap: switch to add_flag/remove_flag