Fix deletion of child window