diff --git a/cli-authpubkey.c b/cli-authpubkey.c
index cf506b8c1b2a416b08fb939bf083afc2d32e5c09..49853ed18be36b96ac7d9ab8d4cd26baa8f4b60b 100644
--- a/cli-authpubkey.c
+++ b/cli-authpubkey.c
@@ -134,13 +134,11 @@ void cli_buf_put_sign(buffer* buf, sign_key *key, int type,
 				sigblob->len);
 
 		buf_free(sigblob);
-	} else {
-#endif
+	} else 
+#endif /* ENABLE_CLI_AGENTFWD */
+	{
 		buf_put_sign(buf, key, type, data, len);
-#ifdef ENABLE_CLI_AGENTFWD
 	}
-#endif
-	
 }
 
 /* TODO: make it take an agent reference to use as well */