Fixed re-assignment bug in fit_phase_shift error calculation.  BEWARE.