fixed problem with global variables