Fixed simulation not closing properly when there's no connection with the server. ( Simulation was still reconnecting )