update flag to lowercase