fixes incorrect active window detection