More fixes for global variables.