Update gamelooper.js

Fixed serious errors