changed to currentWindow rather than lastFocusedWindow