add a max times limitation for setting alias and tag infinitely.