A first attempt at fixing the MongoDB modules.

At least the affected procs are now working rather than segfaulting.