fix bug of rest-time, when some slaves exists
fix bug of scripts