Fix collision bug in password generation