Fix mongodb external script.