Set the global variables in the right pace.