Fix mongodb password generation check.