fix use of window at server