fixed bug with multi window opening