diff --git a/contrib/news/main.php b/contrib/news/main.php
index 5f9b5028..30d42960 100644
--- a/contrib/news/main.php
+++ b/contrib/news/main.php
@@ -13,9 +13,8 @@ class News implements Extension {
 		if(is_null($this->theme)) $this->theme = get_theme_object($this);
 		
 		if($event instanceof PostListBuildingEvent) {
-			global $config;
-			if(strlen($config->get_string("news_text")) > 0) {
-				$this->theme->display_news($event->page, $config->get_string("news_text"));
+			if(strlen($event->context->config->get_string("news_text")) > 0) {
+				$this->theme->display_news($event->page, $event->context->config->get_string("news_text"));
 			}
 		}
 
diff --git a/contrib/news/theme.php b/contrib/news/theme.php
index bf7195e9..c0b351fa 100644
--- a/contrib/news/theme.php
+++ b/contrib/news/theme.php
@@ -4,7 +4,7 @@ class NewsTheme extends Themelet {
 	/*
 	 * Show $text on the $page
 	 */
-	public function display_news($page, $text) {
+	public function display_news(Page $page, $text) {
 		$page->add_block(new Block("Note", $text, "left", 5));
 	}
 }