[nim] Attached the simulation to the session rather than the window