Fixed main game variables scope