fix for >5 tag logic