better handling of commands with multiple flags