Error with global name fixed