Fixes #25 - ensure focused window is used for commands