Fix weird and wonderful MongoDB error