fix reading custom_flags