fix closing child windows