diff --git a/src/toolkit.c b/src/toolkit.c
index 0d2178b..ef27859 100644
--- a/src/toolkit.c
+++ b/src/toolkit.c
@@ -925,6 +925,7 @@ char* window_getInput(const unsigned int wid, char* name) {
   Widget* wgt;
 
   /* Get the widget. */
+  wgt = window_getwgt(wid, name);
   if(wgt == NULL)
     return NULL;