Generation random string method fix