The president of the pilots' union at American Airlines says Boeing made mistakes in its design of the 737 Max and not telling pilots about new flight-control software on the plane. Daniel Carey says Boeing's zeal to minimize pilot-training costs for airlines that would buy its 737 Max jet contributed to errors that led to two deadly crashes and left a "crisis of trust" around aviation safety.

Carey is scheduled to testify Wednesday before House Transportation Aviation Subcommittee that is looking into Boeing and the 737 Max airliner, which remains grounded after accidents that killed 346 people.

Chesley "Sully" Sullenberger, the captain who safely landed a disabled jetliner on the Hudson River in 2009, is also expected to testify. He has said that Boeing was more focused on protecting its product, the Max, than protecting the people who use it.

Get Breaking News Delivered to Your Inbox

The comments underscore the challenges that Boeing still faces in winning the confidence of pilots that the Max can be made safe. Those pilots, in turn, are key to convincing reluctant passengers to fly on the plane.

"That bond between the passenger and the pilot is one that is critical," Boeing CEO Dennis Muilenburg said during an investor presentation in April. Muilenburg said the company made a "mistake" in handling a problematic cockpit warning system in its 737 Max jets before two crashes killed 346 people.

Pilots had complained to Boeing for not telling them about flight software called MCAS until after the October crash of a Lion Air jet in Indonesia. That same software was implicated in a second crash five months later of an Ethiopian Airlines jet.

Although some safety advocates called for grounding the Max after the Lion Air crash, pilot unions at American, Southwest and United stood by the safety of the plane once they were made aware of the software. But then Boeing later admitted a cockpit alert that can tell pilots if the sensors that trigger MCAS are faulty did not work — and the company knew for more than a year before telling the Federal Aviation Administration or the airlines.

That omission outraged some pilots. An American Airlines pilot, Jason Goldberg, said the alert was "one of the things that made us confident initially to make the statement that we were happy to continue to fly the aircraft. It turned out later that that wasn't true."

The acting FAA chief, Daniel Elwell, joined the criticism of Boeing's long silence about the nonworking alert. The warning light was not part of MCAS, and it is not clear that it would have prevented either crash, but the incident raised more doubts about Boeing's candor.

In his testimony Wednesday, Carey will draw attention to MCAS, which was designed to make the Max feel like previous 737 models to pilots despite engines that were larger and placed more forward on the wings and changed the plane's aerodynamics.

"This was a fatal design flaw built into the aircraft at the factory," Carey said in an interview.

Boeing engineers have finished making changes to the software and expect to soon demonstrate its work to government safety officials in hopes that the FAA will certify the plane as safe, three months after it was grounded around the world.

Carey is concerned that pilot training on the updated MCAS system may not be comprehensive enough. He also upbraided those who believe the crashes could not have happened in the United States, calling that notion presumptuous and disrespectful to foreign pilots.

Carey and Sullenberger also question the FAA's independence from Boeing and other companies it regulates. Sullenberger wrote in March that the relationship was too cozy, and he particularly criticized an FAA program that relies on industry employees to perform some safety tests and inspections.

Wednesday's event will be the third congressional hearing into the Max. The previous two have focused on FAA oversight of Boeing, and whether it has been tough enough.

No one from Boeing was scheduled to testify. In a statement, spokesman Peter Pedraza said Boeing was providing information to regulators, airlines and pilots "to re-earn their trust and know we must be more transparent going forward."

During this week's Paris Air Show, Muilenburg expressed confidence that regulators around the world will clear the Max to fly again sometime later this year. Muilenburg said that restoring trust in the Max was Boeing's top priority. "We will take the time necessary" to ensure that the plane is safe, he said.