How did the civil war affect african americans?