Fix MongoDB not always setting up properly

Closes #2