While President Obama was in Philadelphia on Sunday for a pre-election rally, Air Force One experienced a "minor mechanical problem," the White House said.

Obama traveled on the plane from Washington, D.C., to New Haven, Conn., then to Philadelphia, but it was replaced during his rally at Temple University with another C-32 aircraft, a modified version of the Boeing 757-200 planes the Air Force uses for the president's travel.

"While in Philadelphia, we have transferred to a backup airplane due to a minor mechanical problem with one of the aircraft's flaps," White House principal deputy press secretary Eric Schultz said. "This switch to a backup C-32 will not affect our schedule."

Obama was in Pennsylvania to stump for Tom Wolf, the Democratic candidate for governor.

The president departed on time for the airport and is traveling back to Washington on Sunday night.