fixed global reference on window