Fix window activation behaviour