More fixes to make replicaset tests pass