fixing multiple Id assignments