Fix random password generation
Format code