Bug fix for flags.