diff --git a/panels_ipe/src/Form/PanelsIPEBlockPluginForm.php b/panels_ipe/src/Form/PanelsIPEBlockPluginForm.php
index 8735f2f..71d33cb 100644
--- a/panels_ipe/src/Form/PanelsIPEBlockPluginForm.php
+++ b/panels_ipe/src/Form/PanelsIPEBlockPluginForm.php
@@ -1,13 +1,10 @@
 <?php
 
-/**
- * @file
- */
-
 namespace Drupal\panels_ipe\Form;
 
 use Drupal\Component\Plugin\PluginManagerInterface;
 use Drupal\Core\Block\BlockPluginInterface;
+use Drupal\Core\DependencyInjection\DependencySerializationTrait;
 use Drupal\Core\Form\FormBase;
 use Drupal\Core\Form\FormState;
 use Drupal\Core\Form\FormStateInterface;
@@ -78,7 +75,7 @@ public static function create(ContainerInterface $container) {
       $container->get('plugin.manager.block'),
       $container->get('context.handler'),
       $container->get('renderer'),
-      $container->get('user.shared_tempstore')
+      $container->get('ctools.serializable.tempstore.factory')
     );
   }
 
@@ -191,10 +188,10 @@ public function buildForm(array $form, FormStateInterface $form_state, $plugin_i
 
     // 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' => [
@@ -287,13 +284,34 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
       $uuid = $this->panelsDisplay->addBlock($block_config);
     }
 
+    $form_state->set('block', $this->panelsDisplay->getBlock($uuid));
+    $form_state->set('uuid', $uuid);
+
     // Set the tempstore value.
     $this->tempStore->set($this->panelsDisplay->id(), $this->panelsDisplay->getConfiguration());
+  }
+
+  /**
+   * Form API submission callback for buildForm().
+   *
+   * @param array $form
+   *   An associative array containing the structure of the form.
+   * @param \Drupal\Core\Form\FormStateInterface $form_state
+   *   The current state of the form.
+   *
+   * @return array
+   *   The form structure.
+   */
+  public function submitAjax(array &$form, FormStateInterface $form_state) {
+    $block_instance = $form_state->get('block');
+    $block_config = $block_instance->getConfiguration();
+
+    $uuid = $form_state->get('uuid');
 
     // Assemble data required for our App.
     $build = $this->buildBlockInstance($block_instance, $this->panelsDisplay);
 
-    // Bubble Block attributes to fix bugs with the Quickedit and Contextual
+    // Bubble block attributes to fix bugs with the Quickedit and Contextual
     // modules.
     $this->bubbleBlockAttributes($build);
 
@@ -312,6 +330,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
       'html' => $this->renderer->render($build),
     ];
 
+    // Append the build structure to the form.
     $form['build'] = $build;
 
     // Add Block metadata and HTML as a drupalSetting.
