Small fixes in the mongoDB driver