fixed some globals