Reinitialize global variables when necessary (for monolith application).