Some changes required for testing with flags.