fixed focused-window crash