fixed mongo.py bug