fixed game undefined bug