diff --git a/lib/vcategories.php b/lib/vcategories.php
index ee357c350df9ce067df82cfcdd20789b46430e05..ee7a1d2883a8300baf55f6b48848735ca0900468 100644
--- a/lib/vcategories.php
+++ b/lib/vcategories.php
@@ -135,8 +135,9 @@ class OC_VCategories {
 			$vobject = OC_VObject::parse($object);
 			if(!is_null($vobject)) {
 				$this->loadFromVObject($vobject, $sync);
+				unset($vobject);
 			} else {
-                                OC_Log::write('core','OC_VCategories::rescan, unable to parse. ID: '.', '.substr($object, 0, 100).'(...)', OC_Log::DEBUG);				
+				OC_Log::write('core','OC_VCategories::rescan, unable to parse. ID: '.', '.substr($object, 0, 100).'(...)', OC_Log::DEBUG);				
 			}
 		}
 		$this->save();