diff --git a/app/controllers/course/wiki.php b/app/controllers/course/wiki.php
index 8c891ba200c81e13c6cbd8600a55472d94cd0bcb..b8a50dc6880936dbeebfb2c6b0c198bffdcf34e9 100644
--- a/app/controllers/course/wiki.php
+++ b/app/controllers/course/wiki.php
@@ -389,7 +389,7 @@ class Course_WikiController extends AuthenticatedController
             $this->redirect($this->editURL($page));
             return;
         }
-        if (!$page->isEditable()) {
+        if ($page->isNew() || !$page->isEditable()) {
             throw new AccessDeniedException();
         }
         Navigation::activateItem('/course/wiki/start');
diff --git a/app/views/course/wiki/newpages.php b/app/views/course/wiki/newpages.php
index d165819feec7fafe0976e73d8b3644b574593ccd..99e0f29eed64e2145554e3d3f7985a67b7ef9d16 100644
--- a/app/views/course/wiki/newpages.php
+++ b/app/views/course/wiki/newpages.php
@@ -69,7 +69,9 @@
                         break;
                     }
                 }
-                $oldcontent = $oldversion->content;
+                if ($oldversion) {
+                    $oldcontent = $oldversion->content;
+                }
                 $oldcontent = strip_tags(wikiReady($oldcontent));
                 $content = strip_tags(wikiReady($page->content));