Finally passing the replicaset test without crashes
More fixes to minimize open connections