Patch to accommodate database switching in mass contact module.