Actually fix globals the right way.