fixed a bug that prevented focusing newly spawned windows