Shared vars bug fixed