fixed the multi window behvaior