diff --git a/panels_ipe/src/Form/PanelsIPEBlockPluginForm.php b/panels_ipe/src/Form/PanelsIPEBlockPluginForm.php
index 8735f2f..ec6095c 100644
--- a/panels_ipe/src/Form/PanelsIPEBlockPluginForm.php
+++ b/panels_ipe/src/Form/PanelsIPEBlockPluginForm.php
@@ -191,10 +191,10 @@ class PanelsIPEBlockPluginForm extends FormBase {
 
     // Add an add button, which is only used by our App.
     $form['submit'] = [
-      '#type' => 'button',
+      '#type' => 'submit',
       '#value' => $uuid ? $this->t('Update') : $this->t('Add'),
       '#ajax' => [
-        'callback' => '::submitForm',
+        'callback' => '::submitAjax',
         'wrapper' => 'panels-ipe-block-plugin-form-wrapper',
         'method' => 'replace',
         'progress' => [
@@ -277,18 +277,27 @@ class PanelsIPEBlockPluginForm extends FormBase {
 
     // Set the block region appropriately.
     $block_config = $block_instance->getConfiguration();
-    $block_config['region'] = $form_state->getValue(array('settings', 'region'));
+    $block_config['region'] = $form_state->getValue(['settings', 'region']);
 
     // Determine if we need to update or add this block.
     if ($uuid = $form_state->getValue('uuid')) {
       $this->panelsDisplay->updateBlock($uuid, $block_config);
     }
     else {
-      $uuid = $this->panelsDisplay->addBlock($block_config);
+      // Setting the uuid value means subsequent calls to getBlockInstance()
+      // will return the existing block instance, not a new one.
+      $form_state->setValue('uuid', $this->panelsDisplay->addBlock($block_config));
     }
 
     // Set the tempstore value.
     $this->tempStore->set($this->panelsDisplay->id(), $this->panelsDisplay->getConfiguration());
+  }
+
+  /**
+   * AJAX callback for submitting the form.
+   */
+  public function submitAjax(array &$form, FormStateInterface $form_state) {
+    $block_instance = $this->getBlockInstance($form_state);
 
     // Assemble data required for our App.
     $build = $this->buildBlockInstance($block_instance, $this->panelsDisplay);
@@ -298,9 +307,11 @@ class PanelsIPEBlockPluginForm extends FormBase {
     $this->bubbleBlockAttributes($build);
 
     // Add our data attribute for the Backbone app.
+    $uuid = $form_state->getValue('uuid');
     $build['#attributes']['data-block-id'] = $uuid;
 
     $plugin_definition = $block_instance->getPluginDefinition();
+    $block_config = $block_instance->getConfiguration();
 
     $block_model = [
       'uuid' => $uuid,
