added an extra protection against duplicate TID