AC Milan coach Stefano Pioli admits they made hard work of their 4-2 win against Bologna.
Zlatan Ibrahimovic scored at both ends of the pitch with Ismael Bennacer grabbing the lead on 84 minutes before the Swede struck.
“We struggled, because we made the mistake of thinking the game was over when we were 2-0 up with an extra man," Pioli told Sky Italia.
“If you stop playing, then you run a risk in any scenario. Fortunately, we showed the strength to restart and get the win.
“When against nine men, that changed our mentality and we got too frenetic. Having Giroud and Ibrahimovic together also confused us, we were putting too many crosses in without specific aims."
He added: “This is a very important victory, very important. We know after the Champions League fixtures it's tough against teams who had all week to prepare, but we will learn from this experience.
“Now we've got to get back physical and psychological energy to avoid making these mistakes again."