diff --git a/apps/contacts/index.php b/apps/contacts/index.php
index 6f65ac1c6055e7b4780e93917f56bfad6aba75f5..b179d9bbfe58f78e5a7b292c397e9e872a808758 100644
--- a/apps/contacts/index.php
+++ b/apps/contacts/index.php
@@ -44,19 +44,17 @@ OC_App::setActiveNavigationEntry( 'contacts_index' );
 $id = isset( $_GET['id'] ) ? $_GET['id'] : null;
 $details = array();
 
-// FIXME: This cannot work..?
 if(is_null($id) && count($contacts) > 0) {
 	$id = $contacts[0]['id'];
 }
+$vcard = null;
+$details = null;
 if(!is_null($id)) {
 	$vcard = OC_Contacts_App::getContactVCard($id);
-	$details = OC_Contacts_VCard::structureContact($vcard);
+	if(!is_null($vcard) {
+		$details = OC_Contacts_VCard::structureContact($vcard);
+	}
 }
-// if( !is_null($id)/* || count($contacts)*/){
-// 	if(is_null($id)) $id = $contacts[0]['id'];
-// 	$vcard = OC_Contacts_App::getContactVCard($id);
-// 	$details = OC_Contacts_VCard::structureContact($vcard);
-// }
 
 // Include Style and Script
 OC_Util::addScript('contacts','interface');
diff --git a/apps/contacts/lib/app.php b/apps/contacts/lib/app.php
index 907ce82c76af4517b05f34b2b437559d633ed635..00a830d5e5f92070f22914431a07367a2a429cde 100644
--- a/apps/contacts/lib/app.php
+++ b/apps/contacts/lib/app.php
@@ -56,15 +56,14 @@ class OC_Contacts_App{
 		return $card;
 	}
 
+	/**
+	 * @brief Gets the VCard as text
+	 * @returns The card or null if the card could not be parsed.
+	 */
 	public static function getContactVCard($id){
 		$card = self::getContactObject( $id );
 
 		$vcard = OC_VObject::parse($card['carddata']);
-		// Check if the card is valid
-		if(is_null($vcard)){
-			OC_JSON::error(array('data' => array( 'message' => self::$l10n->t('vCard could not be read.'))));
-			exit();
-		}
 		return $vcard;
 	}
 
diff --git a/lib/image.php b/lib/image.php
index bdfa1fefd7da200168b428462618a3749fc3578a..70ad3f5969edc854f2805cfbf773c59f3135afa4 100644
--- a/lib/image.php
+++ b/lib/image.php
@@ -196,7 +196,7 @@ class OC_Image {
 		if (!$res) {
 			OC_Log::write('core','OC_Image::_string. Error writing image',OC_Log::ERROR);
 		}
-		return chunk_split(base64_encode(ob_get_clean()));
+		return base64_encode(ob_get_clean());
 	}
 
 	/**