Changed setting window to global if not defined.