fix amd error when setting globals.