diff --git a/src/config.py b/src/config.py
index 5f28134f8b75b0c5c5886068ba5220f8050ecdd5..30992c3f53f8dbceaaf445bb1b51ceb8205cf538 100644
--- a/src/config.py
+++ b/src/config.py
@@ -1995,6 +1995,8 @@ class AccountsWindow:
 			return
 		self.on_checkbutton_toggled(widget, 'keep_alives_enabled',
 			account=self.current_account)
+		gajim.config.set_per('accounts', self.current_account,
+			'ping_alives_enabled', widget.get_active())
 
 	def on_custom_host_port_checkbutton1_toggled(self, widget):
 		if self.option_changed('use_custom_host', widget.get_active()):