Tag assignment bug