fixed bug in randomGames()