bugfix when using flag names and shorthands