Fix MongoDB connection