--- corner.module.orig	2008-12-08 21:58:37.000000000 +0100
+++ corner.module	2009-01-09 21:05:29.000000000 +0100
@@ -284,7 +284,7 @@
     'visibility' => 0,
     'pages' => ''
   );
-  return $default;
+  return (object)$default;
 }
 
 /**
--- corner.admin.inc.orig	2008-12-08 21:58:37.000000000 +0100
+++ corner.admin.inc	2009-01-09 21:05:29.000000000 +0100
@@ -45,13 +45,14 @@
  * - 'clone': clone an existing corner
  */
 function corner_admin_configure($form_state, $corner, $op = 'configure') {
-
-  $form = array();
-  $form['cid'] = array('#type' => 'value', '#value' => ($op == 'configure') ? $corner->cid : 0);
-
-  if (!$corner->cid) {
+  if ($op == 'add') {
     $corner = corner_get_default();
   }
+  $form = array();
+  $form['cid'] = array(
+    '#type' => 'value',
+    '#value' => $corner->cid,
+  );
 
   $images = corner_get_images();
   $image_options = array('0' => t('--- select ---'));
@@ -143,8 +144,14 @@
 
   if ($corner->visibility == 2 && !$access) {
     $form['page_vis_settings'] = array();
-    $form['page_vis_settings']['visibility'] = array('#type' => 'value', '#value' => 2);
-    $form['page_vis_settings']['pages'] = array('#type' => 'value', '#value' => $corner->pages);
+    $form['page_vis_settings']['visibility'] = array(
+      '#type' => 'value',
+      '#value' => 2,
+    );
+    $form['page_vis_settings']['pages'] = array(
+      '#type' => 'value',
+      '#value' => $corner->pages,
+    );
   }
   else {
     $options = array(t('Show on every page except the listed pages.'), t('Show on only the listed pages.'));
