WIP for mongodb fixes