Fix run errors in regiment script