Fix error with global