Even more fixes for global variables.