diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c
index a21e762..3d6d913 100644
--- a/gtk/gtkprogressbar.c
+++ b/gtk/gtkprogressbar.c
@@ -443,7 +443,7 @@ gtk_progress_bar_real_update (GtkProgress *progress)
     {
       if (GTK_PROGRESS (pbar)->activity_mode)
 	{
-	  guint size;
+	  gint size;
           
 	  /* advance the block */
 
@@ -463,8 +463,8 @@ gtk_progress_bar_real_update (GtkProgress *progress)
 		      widget->allocation.width -
 		      widget->style->xthickness)
 		    {
-		      pbar->activity_pos = widget->allocation.width -
-			widget->style->xthickness - size;
+		      pbar->activity_pos = MAX(0, widget->allocation.width -
+			widget->style->xthickness - size);
 		      pbar->activity_dir = 1;
 		    }
 		}
@@ -493,8 +493,8 @@ gtk_progress_bar_real_update (GtkProgress *progress)
 		      widget->allocation.height -
 		      widget->style->ythickness)
 		    {
-		      pbar->activity_pos = widget->allocation.height -
-			widget->style->ythickness - size;
+		      pbar->activity_pos = MAX(0, widget->allocation.height -
+			widget->style->ythickness - size);
 		      pbar->activity_dir = 1;
 		    }
 		}
