Global variables fixing