avoid connecting for empty strings