cleanup the flags some more