improve $Loop option

patch for previous checkin