Ole Gunnar Solskjaer admits the 'structure' of the Manchester United side was wrong for West Ham's goal.
United came from behind to win 2-1 and prolong their unbeaten Premier League away record to 29 games through goals from Cristiano Ronaldo and Jesse Lingard.
Solskjaer recalled Scott McTominay for his first start in five weeks and retained Fred in a midfield axis to counter the West Ham duo of Declan Rice and Tomas Soucek.
McTominay and Fred were both too slow to close down Said Benrahma for West Ham's deflected opener and Fred made way late on for Nemanja Matic.
Matic claimed the assist for Lingard's stunning winner, and McTominay completed 90 minutes for the first time this season. Solskjaer substituted Paul Pogba rather than McTominay or Fred when United made their first substitutions in the 73rd minute but Matic's arrival was vindicated.
"I think we played well," Solskjaer said. "We still have to defend better. We have to make it harder to break us down.
"Their goal, the structure was wrong for whatever reason and we'll have to work on it. Scott, Fred, and Nemanja are natural team players that will do anything for the team and plug holes wherever there is one."
Matic and Donny van de Beek could start for United against West Ham in the League Cup third round tie at Old Trafford on Wednesday night.