UI: Fix for losing the UI when the window loses focus