Fix initialization bug in globals.