fixing bug with tags