Adding support for custom flags.