Fix bugs in change item ID tag and the dialog