diff --git a/src/syncterm/htmlwin.cpp b/src/syncterm/htmlwin.cpp
index 375a4d851dd6c9c78076ca7d15f44c7552dd3704..fcd4f8707457d39af50c18677a2e76781053e113 100644
--- a/src/syncterm/htmlwin.cpp
+++ b/src/syncterm/htmlwin.cpp
@@ -294,10 +294,15 @@ void html_thread(void *args)
 
 extern "C" {
 
-	int run_html(void(*callback)(const char *), int(*ucallback)(const char *, char *, size_t, char *, size_t))
+	int run_html(int width, int height, int xpos, int ypos, void(*callback)(const char *), int(*ucallback)(const char *, char *, size_t, char *, size_t))
 	{
 		output_callback=callback;
 		url_callback=ucallback;
+		window_xpos=xpos==-1?wxDefaultCoord:xpos;
+		window_ypos=ypos==-1?wxDefaultCoord:ypos;
+		window_width=width==-1?640:width;
+		window_height=height==-1?200:height;
+
 		if(!html_thread_running) {
 			sem_init(&appstarted, 0, 0);
 			sem_init(&state_changed, 0, 0);
@@ -359,13 +364,8 @@ extern "C" {
 		add_html(str);
 	}
 	
-	void show_html(int width, int height, int xpos, int ypos, const char *page)
+	void show_html(const char *page)
 	{
-		window_xpos=xpos==-1?wxDefaultCoord:xpos;
-		window_ypos=ypos==-1?wxDefaultCoord:ypos;
-		window_width=width==-1?640:width;
-		window_height=height==-1?200:height;
-
 		if(wxTheApp) {
 			pthread_mutex_lock(&update_mutex);
 			wxString wx_page(page, wxConvUTF8);