Fix issue with migration script calling mongodb client