diff --git a/libempathy-gtk/empathy-chat-text-view.c b/libempathy-gtk/empathy-chat-text-view.c
index 95e67b7..499c964 100644
--- a/libempathy-gtk/empathy-chat-text-view.c
+++ b/libempathy-gtk/empathy-chat-text-view.c
@@ -339,7 +339,7 @@ chat_text_view_is_scrolled_down (EmpathyChatTextView *view)
 		
 		vadj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (sw));
 		
-		if (vadj->value + vadj->page_size / 2 < vadj->upper - vadj->page_size) {
+		if (gtk_adjustment_get_value (vadj) < gtk_adjustment_get_upper (vadj) - gtk_adjustment_get_page_size (vadj)) {
 			return FALSE;
 		}
 	}
