Remove the update hoo and improve the script.
Increace iterator better.
Merge pull request #5246 from openscholar/3197-improve-script

3197 improve script