Fix mongodb repset code