Bugfix: Incorrect Current Window

Typing letters in another window caused a bug that did not set the
correct current window when switching back to the input window