Improve multi windows support