fixed computation of segment runtime