diff --git a/src/gtkgui_helpers.py b/src/gtkgui_helpers.py
index 35bbfbb1dfdcda875f6b8034f3e3552ba2974861..2a331082cbbc80cca30d59d618298fe3d148bb82 100644
--- a/src/gtkgui_helpers.py
+++ b/src/gtkgui_helpers.py
@@ -691,10 +691,9 @@ default_name = ''):
 		# Get pixbuf
 		pixbuf = None
 		is_fake = False
-		if gajim.contacts.is_pm_from_jid(account, jid):
+		if account and gajim.contacts.is_pm_from_jid(account, jid):
 			is_fake = True
 		pixbuf = get_avatar_pixbuf_from_cache(jid, is_fake)
-
 		ext = file_path.split('.')[-1]
 		type_ = ''
 		if not ext:
@@ -710,6 +709,7 @@ default_name = ''):
 		try:
 			pixbuf.save(file_path, type_)
 		except:
+			#XXX Check for permissions
 			os.remove(file_path)
 			new_file_path = '.'.join(file_path.split('.')[:-1]) + '.jpeg'
 			dialog2 = dialogs.ConfirmationDialog(_('Extension not supported'),
diff --git a/src/vcard.py b/src/vcard.py
index 38a200561ffc27942bb8800ed19f925e2a6b3f55..0adf439928bd72af917e85af720d9b5481de0791 100644
--- a/src/vcard.py
+++ b/src/vcard.py
@@ -216,11 +216,18 @@ class VcardWindow:
 	def on_PHOTO_eventbox_button_press_event(self, widget, event):
 		'''If right-clicked, show popup'''
 		if event.button == 3: # right click
+			if self.vcard:
+				# our own avatar
+				account = None
+				nick = gajim.config.get_per('accounts', self.account, 'name')
+			else:
+				account = self.account
+				nick = self.contact.name
 			menu = gtk.Menu()
 			menuitem = gtk.ImageMenuItem(gtk.STOCK_SAVE_AS)
 			menuitem.connect('activate',
 				gtkgui_helpers.on_avatar_save_as_menuitem_activate,
-				self.contact.jid, self.account, self.contact.name + '.jpeg')
+				self.jid, account, nick + '.jpeg')
 			menu.append(menuitem)
 			menu.show_all()
 			menu.connect('selection-done', lambda w:w.destroy())