diff --git a/lib/gfx/gfx.c b/lib/gfx/gfx.c
index 4bc9f35da40eb1808df664ce7da0d7d41186d106..e26ca9c14de0dfba61704a83c96b9a954651cb4b 100644
--- a/lib/gfx/gfx.c
+++ b/lib/gfx/gfx.c
@@ -87,6 +87,9 @@ void gfx_puts(
 	Color bg
 ) {
 	while (*str) {
+		gfx_putchar(font, r, x, y, *str, fg, bg);
+		str++;
+
 		x += font->Width;
 		if (x >= r->width) {
 			x = 0;
@@ -94,8 +97,6 @@ void gfx_puts(
 		}
 		if (y >= r->height)
 			return;
-		gfx_putchar(font, r, x, y, *str, fg, bg);
-		str++;
 	}
 }