If window is not defined