fixed the order of the windoes