Fix to only intialize the globals once