fix loadGames
Add js test