diff --git a/extensions/hotkeys/ephy-hotkeys-extension.c b/extensions/hotkeys/ephy-hotkeys-extension.c
index 54e7150..3bf21e2 100644
--- a/extensions/hotkeys/ephy-hotkeys-extension.c
+++ b/extensions/hotkeys/ephy-hotkeys-extension.c
@@ -31,6 +31,7 @@
 #include "mozilla-hotkeys.h"
 #include "ephy-debug.h"
 
+#include <epiphany/ephy-embed-container.h>
 #include <epiphany/ephy-extension.h>
 #include <epiphany/ephy-link.h>
 #include <epiphany/ephy-statusbar.h>
@@ -91,7 +92,7 @@ ephy_toggle_hotkeys (EphyWindow *window, gboolean value)
 	g_return_val_if_fail (data != NULL, 0);
 
 	/* Get the embed from the window */
-	embed = ephy_window_get_active_tab (window);
+	embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
 	g_return_val_if_fail (embed != NULL, 0);
 
 	/* Then get the extension from the WindowData */
@@ -270,13 +271,13 @@ dom_key_press_cb (GtkWidget *widget,
 	g_return_val_if_fail (data != NULL, FALSE);
 
 	/* Get the embed from the notebook, and from the window */
-	current_embed = ephy_window_get_active_tab (window);
+	current_embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
 
 	/* Then get the extension from the WindowData */
 	extension = data->extension;
 
 	/* Get the embed from the window */
-	embed = ephy_window_get_active_tab (window);
+	embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
 	g_return_val_if_fail (embed != NULL, FALSE);
 
 	/* Switch the hotkeys display 'on'? */
