diff --git a/lib/template.php b/lib/template.php
index b8adba0833f78fb5c3007a1b1ace4f324ebdbe65..124343bd85ba55eb836778ae17e8f39a7409f736 100644
--- a/lib/template.php
+++ b/lib/template.php
@@ -139,12 +139,14 @@ class OC_Template{
 		}
 
 		// Templates have the ending .php
+		$path = $template;
 		$template .= "$name.php";
 
 		// Set the private data
 		$this->renderas = $renderas;
 		$this->application = $app;
 		$this->template = $template;
+		$this->path = $path;
 		$this->vars = array();
 		$this->l10n = new OC_L10N($app);
 	}
@@ -327,14 +329,13 @@ class OC_Template{
 	 * Includes another template. use <?php echo $this->inc('template'); ?> to
 	 * do this.
 	 */
-	public function inc( $file )
-	{
+	public function inc( $file ){
 		// $_ erstellen
 		$_ = $this->vars;
 
 		// Einbinden
 		ob_start();
-		include( $this->path.'/'.$file.'.php' );
+		include( $this->path.$file.'.php' );
 		$data = ob_get_contents();
 		ob_end_clean();