bugfixes concerning duplicate registration in sim.