Fixing window focus bug.