fix global leak of variable error in schema.js