fix javascript for single game