fix tag parsing problem