fix second loop
minor update