sanitize flag names