Code tweaking for tag updation