Fixed window focus issues