found two bugs: 1) damaged_bridges should have new_ids and 2) lnSa_cap was in Sa not lnSa