The problem with global variables (fixed)