fixing bug with tags not getting updated properly