Fix bug of two elements having the same id.