How did the battle affect the morale of both the Union and Confederate troops?