Fix replication session close which was actually trying to open a new session!!!