fix tag initialization bug