     //	digitalWrite(DTE_RTS, LOW);
     //}
 
-    if (autoConnectHost >=1 && autoConnectHost <= 5 && !autoConnectedAtBootAlready)
+    if (autoConnectHost >=1 && autoConnectHost <= ADDR_HOST_ENTRIES && !autoConnectedAtBootAlready)
     {
         // Phonebook dial
         autoConnectedAtBootAlready = 1;

        numString[1] = '\0';
        
        int phoneBookNumber = atoi(numString);
        if (phoneBookNumber >= 0 && phoneBookNumber <= 5)
        {
            updateEEPROMByte(ADDR_HOST_AUTO, phoneBookNumber);
                        

        
        Modem_PrintOK();
    }
    // AT&PB1=bbs.jammingsignal.com:23
    else if (strncmp(Modem_CommandBuffer, ("AT&PBAUTO="), 10) == 0)
    {
