* fix the checks a bit; don't try to top the window before checking it has been created