bug in findNextTag