You can avoid this problem with something like
if (Window.getWindows().isEmpty()){ updateMessage("Doing work"); }
it's probably not the best answer but it work :)