Fixes on JS to make the game work.