switch-to-window: correct parameter assignment