Fixed bug (again!) with incorrect tag assignments