   int old_position = VfoSelectDigit;
 
   // handle all events in the queue
-  while (queue_len() > 0)
+  while (events_pending() > 0)
   {
     // get next event and handle it
     byte event = pop_event();

  char buf[MAX_FREQ_CHARS + 1];
  
  // get saved frequency, convert to a display buffer
  int address = SaveSlotBase + slot_num * sizeof(unsigned long);
  unsigned long freq;

  EEPROM.get(address, freq);
  ltobbuff(buf, MAX_FREQ_CHARS, freq);
  buf[MAX_FREQ_CHARS] = 0;
  Serial.print("save_restore_display: freq="); Serial.println(freq);
  Serial.print("save_restore_display: buf="); Serial.write(buf, MAX_FREQ_CHARS);

  return event;
}

int events_pending(void)
{
  // Must protect from RE code fiddling with queue
  noInterrupts();
