added handling for a leader node being deleted