try to fix #1413 loading not active window