Fixed session.instance bug when adding several switches