bug fix run-seg